package cn.hl.feign;

import cn.hl.dto.StockDto;
import cn.hl.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

@FeignClient(name = "stock-service",fallbackFactory = StockServiceFallbackFactory.class)
public interface StockService {

    @RequestMapping(value = "/stock/inboundAndOutbound",method = RequestMethod.POST)
    JSONResult inboundAndOutbound(@RequestBody @Valid StockDto stockDto);

}
